Functions that fit a model until \(q\) variables are selected and that returns the indices (and names) of the selected variables.
## package lars:
lars.lasso(x, y, q, ...)
lars.stepwise(x, y, q, ...)## package glmnet:
glmnet.lasso(x, y, q, type = c("conservative", "anticonservative"), ...)
glmnet.lasso_maxCoef(x, y, q, ...)
A named list with elements
logical. A vector that indicates which variable was selected.
logical. A matrix that indicates which variable was selected in which step. Each row represents one variable, the columns represent the steps.
a matrix containing the predictors or an object of class
"mboost".
a vector or matrix containing the outcome.
number of (unique) selected variables (or groups of variables depending on the model) that are selected on each subsample.
a charachter vector specifying if the number of selected
variables per subsample is \(\leq q\) (type = "conservative")
or \(\geq q\) (type = "anticonservative"). The conservative
version ensures that the PFER is controlled.
additional arguments passed to the underlying fitting function.
See the example on glmnet.lasso_maxCoef in stabsel for
the specification of additional arguments via stabsel.
All fitting functions are named after the package and the type of
model that is fitted: package_name.model, e.g.,
glmnet.lasso stands for a lasso model that is fitted using the
package glmnet.
glmnet.lasso_maxCoef fits a lasso model with a given penalty parameter
and returns the q variables with the largest (absolute) coefficients.
If one wants to use glmnet.lasso_maxCoef, one must specify the penalty
parameter lambda (via the ... argument) or in
stabsel via args.fitfun(lambda = ). Note that usually,
the penalty parameter cannot be specified but is chosen such that q
variables are selected. For an example on how to use
glmnet.lasso_maxCoef see stabsel.
stabsel for stability selection itself.